package org.example.rocketmq_consume.listener;


import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;


@Component
@RocketMQMessageListener(topic = "linuxGroup1", consumerGroup = "consumer-group1")//topic 需要先在rocketmq 上手动新建 然后才能使用，而不是通过代码新建 topic
public class LinuxGroup1Listener implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {

        System.out.println("s = " + s);
    }
}
